package dk.agrasys
{
	import mx.collections.ArrayCollection;
	
	[Bindable]
	/**
	 * All informations about users 
	 * @author Duykham
	 * 
	 */
	public class User
	{
		public var username:String;
		public var password:String;
		public var permission:String;
		public var encrypt:String;

		
		/**
		 * Constructor 
		 * @param user
		 * 
		 */		
		public function User(user:Object=null)
		{
			if (user != null)
			{
				fill(user);
			}
		}
		
		/**
		 * Load informations from XML node to an array element 
		 * @param user
		 * 
		 */		
		public function fill(user:Object):void
		{
			this.username = user.username;
			this.password = user.password;
			this.permission = user.permission;
			this.encrypt = user.encrypt;
		}
	}
}